#ifndef _BOARD_H_
#define _BOARD_H_

#include <stdint.h>

void board_init();

#if (defined CONFIG_CARD_C201)
void board_led_gpio_set_val(int val);
void delay_ms(int ms);

#elif (defined CONFIG_CARD_C201_A101)
int board_i2c_read(uint8_t device_address, uint8_t* memory_address, uint8_t* buffer, uint32_t length);
int board_i2c_write(uint8_t device_address, uint8_t* memory_address, uint8_t* buffer, uint32_t length);
void delay_ms(int ms);

#elif (defined CONFIG_CARD_C201_A101_SWI2C)
int board_i2c_read(uint8_t device_address, uint8_t* memory_address, uint8_t* buffer, uint32_t length);
int board_i2c_write(uint8_t device_address, uint8_t* memory_address, uint8_t* buffer, uint32_t length);
void delay_ms(int ms);

#elif (defined CONFIG_CARD_C201_A201)
int board_i2c_read(uint8_t device_address, uint16_t* memory_address, uint8_t* buffer, uint32_t length);
int board_i2c_write(uint8_t device_address, uint16_t* memory_address, uint8_t* buffer, uint32_t length);
void delay_ms(int ms);

#elif (defined CONFIG_CARD_C201_B101)
int board_i2c_read(uint8_t device_address, uint8_t* memory_address, uint8_t* buffer, uint32_t length);
int board_i2c_write(uint8_t device_address, uint8_t* memory_address, uint8_t* buffer, uint32_t length);
void delay_ms(int ms);
uint32_t board_get_ms();

#elif (defined CONFIG_CARD_C201_P302)
void board_spi_write(uint8_t* buffer, uint32_t length);
void delay_ms(int ms);

#elif (defined CONFIG_STM32F401_PICO)
void pico_main(void);
#endif

#endif /* _BOARD_H_ */
